<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<?php
$id = $_GET['id'];
include 'connect.php';
include 'lib/markdown.php';

mysql_select_db($db, $con);
	
$query  = "SELECT * FROM {$table} WHERE ID = {$id}";
$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_assoc($result)) {
		global $name, $date, $postBody;
		$name = stripslashes($row['Name']);
		$date = $row['Date'];
		$postBody  = Markdown(stripslashes($row['postBody']));
}

mysql_close($con);
?>
<html>
<head>
<meta name="robots" content="index, follow"/>
<meta name="description" content="<?php echo $name ?>"/>
<meta name="keywords" content="<?php echo $name ?>"/>
<title><?php echo $name." | Craft and talk" ?></title>
<?php
include 'head.php';
?>
</head>
<body>
<?php
include 'nav.php';
?>
<div id="wrapper">
	<div id="content">
	<?php
		global $name, $date, $postBody;
		echo "<h1><a href='show?id=".$id."'>".$name."</a></h1>"."<small>".$date."</small>".$postBody;
	?>
	
	<h2>Comments</h2>
	
	<div id="disqus_thread"></div>
	<script src="js/captions.js"></script>
	<script src="js/comments.js"></script>
	<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
	</div>
</div>        
<?php
include 'footer.php';
?>
</body>
</html>